using System;

namespace Elte.SqlSpIdx.Parser
{
    public class Token
    {
        private int position;

        public Token(int position)
        {
            this.position = position;
        }

        public int Position
        {
            get { return position; }
            set { position = value; }
        }
    }

    public class Sign : Token
    {
        public bool isPlus;
        public Sign(int position, bool isPlus)
            : base(position)
        {
            this.isPlus = isPlus;
        }
    }

    public class Number : Token
    {
        private double val;
        public Number(int position, double val)
            : base(position)
        {
            this.val = val;
        }

        public double Value
        {
            get { return val; }
            set { val = value; }
        }
    }

    public class Variable : Token
    {
        public string name;
        public Variable(int position, string name)
            : base(position)
        {
            this.name = name;
        }
    }

    public class Times : Token
    {
        public Times(int position) : base(position) { }
    }

    public class LessOrGreaterThan : Token
    {
        public bool isLessThan;
        public LessOrGreaterThan(int position, bool isLessThan)
            : base(position)
        {
            this.isLessThan = isLessThan;
        }
    }

    public class AND : Token
    {
        public AND(int position) : base(position) { }
    }
}
